package com.shsh.safemanage.model;

import com.shsh.safemanage.util.Constants;
import com.shsh.safemanage.util.MessageUtil;

public enum HSECategoryType {
	RENYUANWEIZHI(1, Constants.LABEL_KEY_HSE_CATEGORY_TYPE_RENYUANWEIZHI),
	/**
	 * 
	 */
	GERENFANGHUZHUANGBEI(2, Constants.LABEL_KEY_HSE_CATEGORY_TYPE_GERENFANGHUZHUANGBEI),
	/**
	 * 
	 */
	ZUOYEXINGWEI(3, Constants.LABEL_KEY_HSE_CATEGORY_TYPE_ZUOYEXINGWEI),
	/**
	 * 
	 */
	GONGJUSHEBEI(4, Constants.LABEL_KEY_HSE_CATEGORY_TYPE_GONGJUSHEBEI),
	/**
	 * 
	 */
	ZUOYECHANGSHUO(5, Constants.LABEL_KEY_HSE_CATEGORY_TYPE_ZUOYECHANGSHUO);

	private final int typeID;
	private final String labelKey;

	public static HSECategoryType getHSECategoryTypeByID(int typeID) {
		for (HSECategoryType type : HSECategoryType.values()) {
			if (type.getTypeID() == typeID) {
				return type;
			}
		}
		return null;
	}

	private HSECategoryType(int typeID, String labelKey) {
		this.typeID = typeID;
		this.labelKey = labelKey;
	}

	public int getTypeID() {
		return typeID;
	}

	public String getLable() {
		return MessageUtil.getLabel(labelKey);
	}

}
